﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DataCentral.Dataset;
using DataCentral.BusinessDataObjects;
using DataCentral.Dataset.DataCentralDatasetTableAdapters;

namespace DataCentral
{
    public class ValueListClass
    {
        public DataTable GetRoleList()
        {
            DataCentralDataset dsCentral = new DataCentralDataset();
            RoleTableAdapter daRole = new RoleTableAdapter();
            daRole.Fill(dsCentral.Role);
            return dsCentral.Role;
        }

        public DataTable GetUserList()
        {
            DataCentralDataset dsCentral = new DataCentralDataset();
            UsersTableAdapter daUsers = new UsersTableAdapter();
            daUsers.Fill(dsCentral.Users);
            return dsCentral.Users;
        }

        public DataTable GetModuleList()
        {
            DataCentralDataset dsCentral = new DataCentralDataset();
            ModuleTableAdapter daModule = new ModuleTableAdapter();
            daModule.Fill(dsCentral.Module);
            return dsCentral.Module;
        }

        public DataTable GetDatabaseConfigList()
        {
            DataCentralDataset dsCentral = new DataCentralDataset();
            DatabaseConfigurationTableAdapter daDatabase = new DatabaseConfigurationTableAdapter();
            daDatabase.Fill(dsCentral.DatabaseConfiguration);
            return dsCentral.DatabaseConfiguration;
        }

        public DataTable GetSaleTeamList()
        {
            DataCentralDataset dsCentral = new DataCentralDataset();
            SaleTeamTableAdapter daSaleTeam = new SaleTeamTableAdapter();
            daSaleTeam.Fill(dsCentral.SaleTeam);
            return dsCentral.SaleTeam;
        }

        public DataTable GetCustomerList()
        {
            DataCentralDataset dsCentral = new DataCentralDataset();
            CustomerTableAdapter daCustomer = new CustomerTableAdapter();
            daCustomer.Fill(dsCentral.Customer);
            return dsCentral.Customer;
        }

        public DataTable GetSaleSysPersonList()
        {
            DataCentralDataset dsCentral = new DataCentralDataset();
            SalespersonTableAdapter daSalePerson = new SalespersonTableAdapter();
            daSalePerson.Fill(dsCentral.Salesperson);
            return dsCentral.Salesperson;
        }
    }
}
